<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSendPhoneNumberTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('send_phone_number', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('领取用户id')->default(0)->index();
            $table->char('phone', 11)->comment('手机号码');
            $table->string('city', 20)->default('北京')->comment('地区');
            $table->tinyInteger('rank')->default(1)->comment(' 1精品号，2炸弹号 ，3豹子号');
            $table->tinyInteger('status')->default(0)->comment('0为未领取 ，1为已领取');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('send_phone_number');
    }
}
